// Function to open my popups and close after timer times out

function KillMe(StayAlive){

aimclose=setTimeout("parent.Right.dhtmlwindow.close(our_aim)",StayAlive * 1000); return true
}

function openaim(){ //Define arbitrary function to run desired DHTML Window widget codes
parent.Right.erasewindow()
our_aim=parent.Right.dhtmlwindow.open('ouraim', 'iframe', 'Our_aim2.swf', 'Our aim is to....', 'width=330px,height=155px,random=1,random=1,resize=0,scrolling=0'),KillMe(17);
our_aim.onclose=function(){ //Run custom code when window is about to be closed
 clearTimeout(aimclose); return true
}
} 



function opengeorge(){ //Define arbitrary function to run desired DHTML Window widget codes
parent.Right.erasewindow()
contactgeorge=parent.Right.dhtmlwindow.open('contbox1', 'iframe', 'Cont_george.html', 'Contact for George......', 'width=380px,height=155px,random=1,random=1,resize=0,scrolling=0')
contactgeorge.onclose=function(){ //Run custom code when window is about to be closed
MM_changeProp('Layer10','','style.visibility','hidden','LAYER'); return true
} 
}



function openjune(){ //Define arbitrary function to run desired DHTML Window widget codes
parent.Right.erasewindow()
contactjune=parent.Right.dhtmlwindow.open('contjune', 'iframe', 'Cont_june.html', 'Contact for June......', 'width=380px,height=155px,random=1,random=1,resize=0,scrolling=0')
contactjune.onclose=function(){ //Run custom code when window is about to be closed
MM_changeProp('Layer11','','style.visibility','hidden','LAYER'); return true

} 
}



function opencontacts(){ //Define arbitrary function to run desired DHTML Window widget codes
parent.Right.erasewindow()
parent.Right.dhtmlmodal.open('contactsAll', 'iframe', 'Contacts.html', 'Our Contacts...', 'width=450px,height=330px,left=200px,top=2px,resize=0,scrolling=0');return false
}


// Function to stop viewing source code

message = "Thank you for visiting our site\n";

function NoRightClick() {
   if(((navigator.appName=="Microsoft Internet Explorer")&&(event.button > 1))
   ||((navigator.appName=="Netscape")&&(b.which > 1))){
   alert(message);
         
   }
}


// Function to check if any popups are open and close them before open new one

var flag = 0
var flag2
var flag3 


function erasewindow()
{
		 
try
   {   	
   		choice1.document.close()
   		parent.Right.dhtmlwindow.close(choice1)
		parent.Right.scrollWindow()
		flag = 1
		//flag = ""
		//choice1.load("iframe", flag2, flag3); return true
         }
catch(err)
   {
   //txt="There was an error on this page." +choice1  +"\n\n"
   //txt+="Error description: " + err.description + "\n\n"
   //txt+="Click OK to continue.\n\n"
   //alert(txt)
   return
   }
}


// Function to close popup if already open before creating new one

function nowindow()
{
		 
try
   {   	
   		choice1.document.close()
   		parent.Right.dhtmlwindow.close(choice1)
		parent.Right.scrollWindow()
		choice1.load("iframe", flag2, flag3)
		choice1.show()
		choice1.moveTo(1,1)
		flag = 1
      
   }
catch(err)
   {
   //txt="There was an error on this page." +flag  +"\n\n"
   //txt+="Error description: " + err.description + "\n\n"
   //txt+="Click OK to continue.\n\n"
   //alert(txt)
   return 
   }
}


// Function to scroll right frame to the top - if not at the top

function scrollWindow()
  {
  parent.Right.window.scrollTo(0,0)
  }


function MM_popupMsg(msg) { //v1.0
  alert(msg);
}

function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
  
}


// Start of Func to change property in layers

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_changeProp(objName,x,theProp,theValue) { //v6.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
    if (theValue == true || theValue == false)
      eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
  }
}

// End of Func to change property in layers















