function newWindow(file,window) {
     msgWindow=open('','myWin','resizable=no,width=200,height=400,left=200,top=200');
     msgWindow.location.href = file;
     if (msgWindow.opener == null) msgWindow.opener = self;
}
function newWindow2(file,window,width,height) {
	
    msgWindow=open('',window,'scrollbars=yes,resizable=yes,width='+width+',height='+height+',left=200,top=200');
    msgWindow.location.href = file;
}
var faux = null;
var width = null;
var bgcolor = null;
var pic = new Image(); 

function copyCat(pic,width,height,id,gallery_num) {
	height = (height / 2) * 3;
	height = Math.floor(height);
  faux  = window.open('http://www.sitestogo.biz/stg/public/show_image.php?id='+id +'&image='+pic+'&gallery_num='+gallery_num+'','newWin','dependent,resizable,scrollbars,top=20,left=20,width='+ width +',height='+height+'');

} 
function galleryWin(url,pic_id,width,height,id,gallery_num) {
	height = (height / 2) * 3;
	height = Math.floor(height);
    faux   = window.open(url + '?id='
  			+ id + '&image_id=' + pic_id + '&gallery_num='
			+ gallery_num +'',
			'newWin',
			'dependent,resizable,scrollbars,top=20,left=20,width=' + width + ',height=' + height + '');

} 
 function openterms(id)
 {
window.open('http://www.sitestogo.biz/stg/homepages/terms.php?id='+id, 'new', ' scrollbars=yes,width=400,height=300',false);
 }
 function openwindetails(id){
	var url = 'terms.php?id=' + id;
window.open(url, 'new', ' scrollbars=yes,width=500,height=300',false);
 }
  function openprivacy(id)
 {
window.open('http://www.sitestogo.biz/stg/homepages/terms.php?privacy=on&id='+id, 'new', ' scrollbars=yes,width=400,height=300',false);
 }
 function openbespoke(id)
 {
thewindow = window.open('http://www.sitestogo.biz/stg/bespoke_app/index.php?id='+id, 'MyWin', ' scrollbars=yes,width=550,height=500,top=0,left=0,screenX=0,screenY=0',false);
 }
 function quicktime_embed (movie,width,height){
	var qthtml= "";
	if (navigator.plugins && navigator.plugins.length) {
		qthtml += '<object type="video/quicktime" data="' + movie + '" width="' + width + '" height="' + height +'">';
		qthtml += '<param name="src" value="' + movie + '" />';
		qthtml += '<param name="autoplay" value="false" />';
		qthtml += '<param name="controller" value="true" />';
		qthtml += '<param name="cache" value="true" />';
		qthtml += '<param name="href" value="' + movie + '" />';
		qthtml += '<param name="target" value="myself" />';
		qthtml += '</object>';
	
	} else {
		qthtml += '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="' + width + '"height="' + height +'" codebase="http://www.apple.com/qtactivex/qtplugin.cab">';
		qthtml += '<param name="src" value="' + movie + '" />';
		qthtml += '<param name="autoplay" value="false" />';
		qthtml += '<param name="controller" value="true" />';
		qthtml += '</object> ';
	}
	document.write(qthtml);

}
function bigimage(sPicURL) {
	
	nPicURL = new String(sPicURL);
	
	nPicURL = nPicURL.replace("thumbstg_","");
	window.open( "stg/public/display_image.php?image="+nPicURL, "",  
     "resizable=1,height=200,width=200");
   } 
  function openfooter(page)
{
window.open(page, 'new', ' scrollbars=yes,width=400,height=300',false);
}
