var OSName="Unknown OS";
if (navigator.appVersion.indexOf("Win")!=-1) OSName="Windows";
if (navigator.appVersion.indexOf("Mac")!=-1) OSName="MacOS";
if (navigator.appVersion.indexOf("X11")!=-1) OSName="UNIX";
if (navigator.appVersion.indexOf("Linux")!=-1) OSName="Linux";

// Main Buttons
homeon= new Image;
homeon.src="images/buttons/home_on.gif";
homeoff= new Image;
homeoff.src="images/buttons/home.gif";

mainon= new Image;
mainon.src="images/buttons/main_on.gif";
mainoff= new Image;
mainoff.src="images/buttons/main.gif";

buffeton= new Image;
buffeton.src="images/buttons/buffet_on.gif";
buffetoff= new Image;
buffetoff.src="images/buttons/buffet.gif";

offeron= new Image;
offeron.src="images/buttons/2for1_on.gif";
offeroff= new Image;
offeroff.src="images/buttons/2for1.gif";

takeon= new Image;
takeon.src="images/buttons/take_on.gif";
takeoff= new Image;
takeoff.src="images/buttons/take.gif";

takeseton= new Image;
takeseton.src="images/buttons/takeset_on.gif";
takesetoff= new Image;
takesetoff.src="images/buttons/takeset.gif";

galleryon= new Image;
galleryon.src="images/buttons/gallery_on.gif";
galleryoff= new Image;
galleryoff.src="images/buttons/gallery.gif";

contacton= new Image;
contacton.src="images/buttons/cont_on.gif";
contactoff= new Image;
contactoff.src="images/buttons/cont.gif";

// Secondary Buttons
home2on= new Image;
home2on.src="images/buttons/home.gif";
home2off= new Image;
home2off.src="images/buttons/home_on.gif";

main2on= new Image;
main2on.src="images/buttons/main.gif";
main2off= new Image;
main2off.src="images/buttons/main_on.gif";

buffet2on= new Image;
buffet2on.src="images/buttons/buffet.gif";
buffet2off= new Image;
buffet2off.src="images/buttons/buffet_on.gif";

offer2on= new Image;
offer2on.src="images/buttons/2for1.gif";
offer2off= new Image;
offer2off.src="images/buttons/2for1_on.gif";

take2on= new Image;
take2on.src="images/buttons/take.gif";
take2off= new Image;
take2off.src="images/buttons/take_on.gif";

takeset2on= new Image;
takeset2on.src="images/buttons/takeset.gif";
takeset2off= new Image;
takeset2off.src="images/buttons/takeset_on.gif";

gallery2on= new Image;
gallery2on.src="images/buttons/gallery.gif";
gallery2off= new Image;
gallery2off.src="images/buttons/gallery_on.gif";

contact2on= new Image;
contact2on.src="images/buttons/cont.gif";
contact2off= new Image;
contact2off.src="images/buttons/cont_on.gif";

// Other Rollovers
mapon= new Image;
mapon.src="images/buttons/map_on.gif";
mapoff= new Image;
mapoff.src="images/buttons/map.gif";

deliveryon= new Image;
deliveryon.src="images/buttons/delivery_on.gif";
deliveryoff= new Image;
deliveryoff.src="images/buttons/delivery.gif";

voucheron= new Image;
voucheron.src="images/buttons/voucher_on.gif";
voucheroff= new Image;
voucheroff.src="images/buttons/voucher.gif";

// Rollover
function lightup(imgName)
{
imgOn=eval(imgName + "on.src");
document[imgName].src= imgOn;
}

function turnoff(imgName)
{
imgOff=eval(imgName + "off.src");
document[imgName].src= imgOff;
}

function printit()
{

if (OSName =="Windows")
{
print();
}

else
{
alert("Please select print from the menu");
}
}

function window_option(WinW,WinH)
{
var x,y;
x=(screen.width/2-(WinW/2));
y=(screen.height/2-(WinH/2));
/*
if (OSName == "MacOS")
{
WinH = parseInt(WinH) - 5;
WinW = parseInt(WinW) - 9;
}
*/
option = "height=" + WinH +",width="+ WinW +",left=" + x +",top="+ y;
return option;
}

function popupwindow(URL, Width, Height)
{

Height = parseInt(Height) - 16;
Width = parseInt(Width) - 16;

option = window_option(Width,Height);
window.open(URL,"",option);
}

var pic1width = "340";
var pic1height = "500";
var pic2width = "500";
var pic2height = "340";
var pic3width = "500";
var pic3height = "340";
var pic4width = "500";
var pic4height = "340";
var pic5width = "340";
var pic5height = "500";
var pic6width = "340";
var pic6height = "500";


function enlarge(pic)
{
Width = pic + "width";
Height = pic + "height";

ImgHeight = eval(Height);
ImgWidth = eval(Width);

temp = "<html>\n";
temp += "<head>\n";
temp += "<title>Pipasha - Gallery</title>\n";
temp += "<style type=\"text/css\">\n";
temp += "body { margin: 0px; padding: 0px; }\n";
temp += "</style>\n";
temp += "</head>\n";
temp += "<body>\n\n";

temp += "<center>\n\n";

temp += "<img src=\"images/gallery/" + pic + ".jpg\"";
temp += " width=" + ImgWidth;
temp += " height=" + ImgHeight;
temp += " alt=\"" + pic + "\">\n\n"

temp += "</center>\n\n";

temp += "</body>\n";
temp += "</html>";

WinHeight = parseInt(eval(Height)) - 16;
WinWidth = parseInt(eval(Width)) - 16;

option = window_option(WinWidth,WinHeight);
newwindow = window.open("","", option);
var newwindow = newwindow.document
newwindow.write(temp);
}