function showpic(url,description) {
	window.open(url + escape(description),'_blank','toolbar=no,status=no,scrollbars=yes,resizable=yes,location=no')
}

function DiscussionPopup() {
   popup = window.open('http://discuss.futuremark.com/forum/opendiscussionpopup.pl','_blank','width=260,height=420,resizable=yes,scrollbars=yes')
}

function RemotePopup() {
   popup = window.open('http://discuss.futuremark.com/forum/includes/remotecontrol/remotecontrol.shtml','_blank','width=100,height=100,resizable=no,scrollbars=no,statusbar=no')
}

function IrcPopup() {
   popup = window.open('http://discuss.futuremark.com/irc/irc.cgi','_blank','width=800,height=600,resizable=yes,scrollbars=no')
}

function openCounter() {
	window.open('http://service.futuremark.com/counter/counter.jsp','Counter','width=340,height=146,left=100');
}

function openMOProduct(url) {
	moPopup = window.open(url,'_blank','width=550,height=450,resizable=yes,scrollbars=yes');
	if (!moPopup.opener)
         moPopup.opener = self; 
	
}
function openPressForm() {
   window.open('http://www.futuremark.com/companyinfo/?mailinglist.shtml','_blank','width=405,height=600,resizable=yes,scrollbars=yes,statusbar=no')
}

function openAffiliateCheck() {
        window.open('/companyinfo/affiliates_tc.shtml','_blank','width=405,height=600,resizable=yes,scrollbars=yes,statusbar=no');
}
function openAffiliate(arg) {

        if(arg == "yes") {
        window.close();
    window.open('https://signup.cj.com/signup/brandedPublisherSignUp.do?air_refmerchantid=985396');
        }
        else
        window.close();
}

function openShop(productstring) {
        if (productstring) {
                var URL = 'https://shop.futuremark.com/shop/?' + productstring;
        } else {
                var URL = 'https://shop.futuremark.com/shop/';
        }
        var windowStyle = 'resizable=yes,scrollbars=yes,menubar=yes,status=yes,width=700,height=';
        var windowHeight = screen.height - 200;
        if (windowHeight < 360) {
                windowHeight = 360;
        }
        windowStyle += windowHeight;
        var popup = window.open(URL,'_blank',windowStyle);
}

function openPage_www(page) {
        var windowStyle = 'resizable=yes,scrollbars=yes,menubar=yes,width=658,height=';

        if(screen.height > 1030){
                var windowHeight = 1030 - 150;
        }
        else {
                var windowHeight = screen.height - 150;
        }
        if (windowHeight < 360) {
                windowHeight = 360;
        }
        windowStyle += windowHeight;

        //alert(page);
                window.open('https://www.madonion.com/servlets/Index?pageid=/sa/shop/new_user_1','Comparison',windowStyle);
}

function openSM(SAId, locale) {
		var windowStyle = 'width=658,scrollbars,height=';
		var windowHeight = screen.height - 100;
		if ( windowHeight < 400 ) {
			windowHeight = 400;
		}
		if ( windowHeight > 750 ) {
			windowHeight = 750;
		}
		windowStyle += windowHeight;
		window.open('http://ccon.madonion.com/servlet/Index?pageid=/sa/systemanalyzer/index&SAId=' + SAId + "&lang=" + locale,'SupportMark',windowStyle);
}

function openSupport() {
	var windowStyle = 'width=595,scrollbars,resizable,height=';
	var windowHeight = screen.height - 100;
	if ( windowHeight < 400 ) {
		windowHeight = 400;
	}
	if ( windowHeight > 800 ) {
		windowHeight = 800;
	}
	windowStyle += windowHeight;
	window.open('http://dcon.futuremark.com/sa/fmsupport/index.jsp','Support',windowStyle);
}
