// JavaScript Document
var imageStore;
function imagePreload()
{ 
  var args = imagePreload.arguments;
  imageStore = new Array(args.length);
  for(var i=0; i<args.length; i++)
  {
    imageStore[i] = new Image();
    imageStore[i].src = args[i];
  }
}
imagePreload('graphics/buttons/aboutus.jpg','graphics/buttons/aboutusRO.jpg','graphics/buttons/contactus.jpg','graphics/buttons/contactusRO.jpg','graphics/buttons/gallery.jpg','graphics/buttons/galleryRO.jpg','graphics/buttons/otherservices.jpg','graphics/buttons/otherservicesRO.jpg','graphics/buttons/pricing.jpg','graphics/buttons/pricingRO.jpg','graphics/buttons/testimonials.jpg','graphics/buttons/testimonialsRO.jpg','graphics/buttons/usefullinks.jpg','graphics/buttons/usefullinksRO.jpg');
function swapImage(imgName, imgSrc)
{
	if (document.images)
	{
		document[imgName].src = imgSrc;
	}
}
function swapImage2(imgName, imgSrc, w, h)
{
	if (document.images)
	{
		document[imgName].src = imgSrc;
		document[imgName].width = w;
		document[imgName].height = h;
	}
}
function changecolor(theId, newcolor)
{
	if(document.getElementById)
	{
//		document.getElementById(theId).style.backgroundColor = newcolor; 
		document.getElementById(theId).style.color = newcolor; 
		return;
	}
}


function switchMenu(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("submenus").getElementsByTagName("div"); //DynamicDrive.com change
		if(el.style.display != "block"){ //DynamicDrive.com change
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="submenu") //DynamicDrive.com change
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}

window.onerror = null;
 var bName = navigator.appName;
 var bVer = parseInt(navigator.appVersion);
 var NS4 = (bName == "Netscape" && bVer >= 4);
 var IE4 = (bName == "Microsoft Internet Explorer" 
 && bVer >= 4);
 var NS3 = (bName == "Netscape" && bVer < 4);
 var IE3 = (bName == "Microsoft Internet Explorer" 
 && bVer < 4);
 var blink_speed=600;
 var i=0;
 
if (NS4 || IE4) {
 if (navigator.appName == "Netscape") {
 layerStyleRef="layer.";
 layerRef="document.getElementById(\"";
 styleSwitch=".style";
 }else{
 layerStyleRef="layer.style.";
 layerRef="document.getElementById(\"";
 styleSwitch=".style";
 }
}

//BLINKING
function Blink(layerName){
 if (NS4 || IE4) { 
 if(i%2==0)
 {
 //eval(layerRef+'["'+layerName+'"]'+
eval(layerRef+layerName+'")'+
 styleSwitch+'.visibility="visible"');
 }
 else
 {
 //eval(layerRef+'["'+layerName+'"]'+
 eval(layerRef+layerName+'")'+
 styleSwitch+'.visibility="hidden"');
 }
 } 
 if(i<1)
 {
 i++;
 } 
 else
 {
 i--
 }
 setTimeout("Blink('"+layerName+"')",blink_speed);
}

function album(albumset){
	var pagename = 'album'+albumset+'.htm';
	window.open(pagename,'Album','width=800,height=550,resizeable=no,toolbar=no,status=no');
	//window.open(pagename,'Cupido Photography Storytelling Album',width='600px',height='600px',resizeable='no',toolbar='no',status='no');
}
