function trackEvent(actionType,elementName,downloadPath){ switch (actionType){ case "directDownload": _gaq.push(['_trackEvent', 'grammarchecklp4', 'download', elementName]); setTimeout(function () { document.location.href = "http://www.whitesmoke.com/postDownload/"; }, 4000); break; case "onclickDownload": _gaq.push(['_trackEvent', 'grammarchecklp4', 'download', elementName]); setTimeout(function () { document.location.href = "http://www.whitesmoke.com/postDownload/"; }, 4000); document.location.href = downloadPath; break; case "buy": _gaq.push(['_trackEvent', 'grammarchecklp4', 'buy', elementName]); break; default: _gaq.push(['_trackEvent', 'grammarchecklp4', 'download', elementName]); } } function asend() { _mark_pixel("FILE_DOWNLOAD"); wsDownload('', ''); } function Close123() { var p=document.getElementById("popup"); p.style.visibility="hidden"; } function show123() { var p=document.getElementById("popup"); p.style.visibility = "visible"; } setTimeout("show123();",8000); /*------------------------------------------------------------*/ function function_exists (function_name) { if (typeof function_name == 'string'){ return (typeof this.window[function_name] == 'function'); } else{ return (function_name instanceof Function); } } /*------------------------------------------------------------*/ var _marker=new Image(),_marker_timer=(new Date()).getTime() function _mark_pixel(pixel) { _marker.src="http://www.white-smoke-2011.com/pixel.php?event="+pixel; } function _mark_timer(page) { var _ct=(new Date()).getTime() _marker.src="http://www.white-smoke-2011.com/timer.php?page="+page+"&timer="+(_ct-_marker_timer) } function rollOver(element) { for( var x = 0; element.childNodes[x]; x++ ) { if( element.childNodes[x].tagName == 'UL' ) element.childNodes[x].style.display = 'block'; } } function rollOut(element) { for( var x = 0; element.childNodes[x]; x++ ) { if( element.childNodes[x].tagName == 'UL' ) element.childNodes[x].style.display = 'none'; } }