
function winOpen(url,name,features)
{
	
	var myWidth = 0, myHeight = 0;
	myWidth = window.screen.availWidth;
	myHeight = window.screen.availHeight;

	/*if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myWidth = window.screen.availWidth;
		myHeight = window.screen.availHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	}*/
	if(features == "")
	{
		features = "width=" + myWidth + ",height=" + myHeight + ",status=yes,toolbar=no,menubar=no,location=no";	
	}
	var a = window.open(url,name,features);
}

function openPopup(url,name,w,h)
{
	var a = window.open(url,name,"width=" + w + ",height=" + h + ",status=yes,toolbar=no,menubar=no,location=no");
}

function checkRes(url)//checks resolution of client's screen to see if popup is needed
{
	var w = 0, h = 0;
	w = window.screen.availWidth;
	h = window.screen.availHeight;
	if(h <= 768)
	{
		var a = window.open(url,"LoveQuiz","width=" + w + ",height=" + h + ",status=yes,toolbar=no,menubar=no,location=no");
		return false;	
	}	
	else
		return true;

}

function embedQuicktime(url,w,h)
{
	document.write('<object CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="' + w + '" height="' + h + '" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">');
	document.write('<param name="src" value="' + url + '">');
	document.write('<param name="autoplay" value="true">');
	document.write('<param name="loop" value="false">');
	document.write('<param name="controller" value="true">');
	document.write('<param name="kioskmode" value="true">');
	document.write('<embed src="' + url + '" width="' + w + '" height="' + h + '" autoplay="true" loop="false" controller="true" kioskmode="true" pluginspage="http://www.apple.com/quicktime/"></embed>');
	document.write('</object>');
}
