function loadurl(){

var URLString = location.href;
if(URLString.lastIndexOf("/UPM_a2") == -1){
var resURL = URLString+"UPM_a2/index.html";
window.location.href = resURL;
                //var win = window.open(resURL,'_self');
                }
 var username;

        username=getCookie("USERNAME");
        if(username == null || username =="null"){
        username = "";
        }else if(username == "Guest"){
        username = "";
        }
 
        var proobj=document.getElementById('myusernameid');
        proobj.innerHTML = username;
        var domainlogin = URLString.search("/index.html");
        var domainloginafter = URLString.search("h=UPM");
        var iframelogin = URLString.search("value");
        //alert("iframelogin===="+iframelogin);
       /*  if(domainlogin!="-1" && domainloginafter == "-1" && iframelogin == -1){
        var domain_sub = URLString+"?h=UPM&t=UPM";
        
        var win = window.open(domain_sub,'_self');
        }else  */
       /*  if(iframelogin != -1 && domainloginafter == "-1"){
        var domain_sub = URLString+"&h=UPM&t=UPM";
        
        var win = window.open(domain_sub,'_self');
        }  */
        var usertype=getCookie('USERTYPE');
        //alert("usertype==============="+usertype);
        if(usertype == "USER"){
        
        document.getElementById("myusernameid").style.display = "";
        document.getElementById("myaccountid").style.display = "";
        document.getElementById("signinid").style.display = "none";
        document.getElementById("signout").style.display = "";
        
        }else{
        clearcookie();
        document.getElementById("myusernameid").style.display = "none";
        document.getElementById("signout").style.display = "none";
        document.getElementById("signinid").style.display = "";
        } 
}
function clearcookie(){
eraseCookie("USER_ID");
eraseCookie("SESSION_ID");
eraseCookie("FIRST_NAME");
eraseCookie("LAST_NAME");
eraseCookie("EMAIL");
eraseCookie("USERNAME");
eraseCookie("USERTYPE");
eraseCookie("MODULENAME");
}
function SetUserSesion(sessionid, type, navigate, username){
    setCookie("SESSION_ID",sessionid,0);
    setCookie("USERTYPE",type,0);
    setCookie("USERNAME",username,0);
    
    
    
    if (navigate == "Navigate"){
        var URLString = location.href;
        var domain = URLString.substring(0,URLString.lastIndexOf("/sign-in.html?h=UPM&t=UPM"));
        if(domain!="-1"){
            var resURL = domain+"/My_Workspace.html?h=UPM&t=UPM";
            var win = window.open(resURL,'_self');
        }
    }else
     if (navigate == "forward"){
        var URLString = location.href;
       
        var domain = URLString.substring(0,URLString.lastIndexOf("/Newsletter_Registration.html?h=UPM&t=UPM"));
       
        if(domain!="-1"){
            var resURL = domain+"/My_Workspace.html?h=UPM&t=UPM";
            var win = window.open(resURL,'_self');
        }
    }
    username=getCookie("USERNAME");
        
         if(username == null || username =="null"){
        username = "";
        }else if(username == "Guest"){
        username = "";
        }
        var proobj=document.getElementById('myusernameid');
        proobj.innerHTML = username;
}
function gotousesdemo(){

         var URLString = location.href;
        var domain = URLString.substring(0,URLString.lastIndexOf("/"));
        if(domain!="-1"){
            var resURL = domain+"/VideoUsesDemo.html";
        var win = window.open(resURL,'addwindow','height=760,width=1000,left=50');
        }
        
}
function gotopressdemo(){
        var URLString = location.href;
        var domain = URLString.substring(0,URLString.lastIndexOf("/"));
        if(domain!="-1"){
        var resURL = domain+"/PressVideo.html";
        var win = window.open(resURL,'addwindow','height=760,width=1000,left=50');
        }
}
function gotoproductdemo(){
      
   var URLString = location.href;
        var domain = URLString.substring(0,URLString.lastIndexOf("/"));
        if(domain!="-1"){
    var resURL = domain+"/Video_Demonstrations.html";
    var win = window.open(resURL,'addwindow','height=760,width=1000,left=50');  
    }
    }
function navigation(value){
	var URLString = location.href;
	var domain = URLString.substring(0,URLString.lastIndexOf("/"));
	if(value=="products")
	var resURL = domain+"/products.html?h=UPM&t=UPM";
	 if(value=="My_Workspace")
	var resURL = domain+"/My_Workspace.html?h=UPM&t=UPM";
	if(value=="My_Account")
	var resURL = domain+"/My_Account.html?h=UPM&t=UPM";
	var win = window.open(resURL,'_self');
	if(value=="Newsletter_Registration")
	var resURL = domain+"/Newsletter_Registration.html?h=UPM&t=UPM";
	var win = window.open(resURL,'_self');
	}
function getFlag(){
var val;
var hu = window.location.search.substring(1);
var domain = URLString.substring(0,URLString.lastIndexOf("/"));
var val=hu.split("=");
//alert("val[0]============="+val[0]);
if(val[0] == "flag"){
val = "true";
}else{
val = "false";
}
return val;
}
function addiframe(){

var URLString = location.href;
var hu = window.location.search.substring(1);
var sinin = URLString.indexOf("sign-in.html");
var domain = URLString.substring(0,URLString.lastIndexOf("/"));
var obj = document.getElementById("index");

    if(hu==""){
      var resURL = domain+"/upm_iframes/index_iframe.html";
      obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='970px' scrolling='no' frameborder='0'/>";
    }else 
    {
      var val=hu.split("=");
    
    if(val[0]!="value"){
   
    var resURL = domain+"/upm_iframes/index_iframe.html";
    obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='100%' scrolling='no' frameborder='0'/>";
    }else if(val[1] == "1&h"){   
    var resURL = domain+"/upm_iframes/product_accessories.html";   
    obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='750px' scrolling='no' frameborder='0'/>";
    }else if(val[1] == "2&h"){   
    var resURL = domain+"/upm_iframes/books-guides-publications.html";   
    obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='750px' scrolling='no' frameborder='0'/>";
    }else if(val[1] == "3&h"){   
    var resURL = domain+"/upm_iframes/digital-cameras-electronics.html";   
    obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='750px' scrolling='no' frameborder='0'/>";
    }else if(val[1] == "4&h"){   
    var resURL = domain+"/upm_iframes/bulk-licensing-enterprise-information.html";   
    obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='2350px' scrolling='no' frameborder='0'/>";
    }else if(val[1] == "5&h"){   
    var resURL = domain+"/upm_iframes/get-our-deluxe-version.html";   
    obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='1550px' scrolling='no' frameborder='0'/>";
    }else if(val[1] == "6&h"){   
    var resURL = domain+"/upm_iframes/who-we-are.html";   
    obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='750px' scrolling='no' frameborder='0'/>";
    }else if(val[1] == "7&h"){   
    var resURL = domain+"/upm_iframes/upm-mission.html";   
    obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='750px' scrolling='no' frameborder='0'/>";
    }else if(val[1] == "8&h"){   
    var resURL = domain+"/upm_iframes/common-applications-and-uses.html";   
    obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='750px' scrolling='no' frameborder='0'/>";
    }else if(val[1] == "9&h"){   
    var resURL = domain+"/upm_iframes/the-benefits-of-our-web-application.html";   
    obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='4450px' scrolling='no' frameborder='0'/>";
    }else if(val[1] == "10&h"){   
    var resURL = domain+"/upm_iframes/learn-why-we-support-green.html";   
    obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='1350px' scrolling='no' frameborder='0'/>";
    }else if(val[1] == "11&h"){   
    var resURL = domain+"/upm_iframes/public-relations-press-articles.html";   
    obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='4550px' scrolling='no' frameborder='0'/>";
    }else if(val[1] == "12&h"){   
    var resURL = domain+"/upm_iframes/our-company.html";   
    obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='750px' scrolling='no' frameborder='0'/>";
    }else if(val[1] == "13&h"){   
    var resURL = domain+"/upm_iframes/newsletter-management.html";   
    obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='750px' scrolling='no' frameborder='0'/>";
    }else if(val[1] == "14&h"){   
    var resURL = domain+"/upm_iframes/faq.html";   
    obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='2550px' scrolling='no' frameborder='0'/>";
    }else if(val[1] == "15&h"){   
    var resURL = domain+"/upm_iframes/demo.html";   
    obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='1350px' scrolling='no' frameborder='0'/>";
    }else if(val[1] == "16&h"){   
    var resURL = domain+"/upm_iframes/get-the-most-from-your-software.html";   
    obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='1250px' scrolling='no' frameborder='0'/>";
    }else if(val[1] == "17&h"){   
    var resURL = domain+"/upm_iframes/release-information.html";   
    obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='750px' scrolling='no' frameborder='0'/>";
    }else if(val[1] == "18&h"){   
    var resURL = domain+"/upm_iframes/aboutus.html";   
    obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='750px' scrolling='no' frameborder='0'/>";
    }else if(val[1] == "19&h"){   
    var resURL = domain+"/upm_iframes/contactus.html";   
    obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='750px' scrolling='no' frameborder='0'/>";
    } else if(val[1] == "20&h"){   
    var resURL = domain+"/upm_iframes/faq.html";   
    obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='2300px' scrolling='no' frameborder='0'/>";
    } else if(val[1] == "21&h"){   
    var resURL = domain+"/upm_iframes/demo.html";   
    obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='1500px' scrolling='no' frameborder='0'/>";
    }else if(val[1] == "22&h"){   
    var resURL = domain+"/upm_iframes/privacy-rights.html";   
    obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='5000px' scrolling='no' frameborder='0'/>";
    }else if(val[1] == "23&h"){   
    var resURL = domain+"/upm_iframes/software-license-agreement.html";   
    obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='5000px' scrolling='no' frameborder='0'/>";
    }
}
}
function navigate(value){
 
  var obj = document.getElementById("index");
  var URLString = location.href;
  var domain = URLString.substring(0,URLString.lastIndexOf("/"));
      if(domain!="-1"){
            if(value=="home"){
                 var resURL = domain+"/index.html?h=UPM&t=UPM";
                 var win = window.open(resURL,'_self');            
                }else if(value=="products"){
                 clearcookie();
                 var resURL = domain+"/products.html?h=UPM&t=UPM";
                 var win = window.open(resURL,'_self');            
                }else if(value=="downloads"){
                 var resURL = domain+"/products.html?h=UPM&t=UPM";
                 var win = window.open(resURL,'_self');            
                }else if(value=="aboutus"){
                 var resURL = domain+"/aboutus.html?h=UPM&t=UPM";
                 var win = window.open(resURL,'_self');            
                }else if(value=="contactus"){
                 var resURL = domain+"/contactus.html?h=UPM&t=UPM";
                 var win = window.open(resURL,'_self');            
                }else if(value=="faq"){
                 var resURL = domain+"/faq.html?h=UPM&t=UPM";
                 var win = window.open(resURL,'_self');            
                }else if(value=="agreement"){
                 var resURL = domain+"/software-license-agreement.html?h=UPM&t=UPM";
                 var win = window.open(resURL,'_self');            
                }else if(value=="rights"){
                 var resURL = domain+"/privacy-rights.html?h=UPM&t=UPM";
                 var win = window.open(resURL,'_self');            
                }else if(value=="signin"){
                var resURL = domain+"/sign-in.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='1450px' scrolling='no' frameborder='0'/>";                             
                }else if(value=="1"){
                  var resURL = domain+"/upm_iframes/appraisers.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='1450px' scrolling='no' frameborder='0'/>";       
                }else if(value=="2"){
                  var resURL = domain+"/upm_iframes/architects.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='2550px' scrolling='no' frameborder='0'/>";       
                }else if(value=="3"){
                  var resURL = domain+"/upm_iframes/concrete-asphalt.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='2250px' scrolling='no' frameborder='0'/>";       
                }else if(value=="4"){
                  var resURL = domain+"/upm_iframes/contracting.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='2050px' scrolling='no' frameborder='0'/>";       
                }else if(value=="5"){
                  var resURL = domain+"/upm_iframes/developers.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='476px' height='750px' scrolling='no' frameborder='0'/>";       
                }else if(value=="6"){
                  var resURL = domain+"/upm_iframes/do-it-yourself.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='1550px' scrolling='no' frameborder='0'/>";       
                }else if(value=="7"){
                  var resURL = domain+"/upm_iframes/electrical.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='1050px' scrolling='no' frameborder='0'/>";       
                }else if(value=="8"){
                  var resURL = domain+"/upm_iframes/engineers.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='3850px' scrolling='no' frameborder='0'/>";       
                }else if(value=="9"){
                  var resURL = domain+"/upm_iframes/enterprises-oem.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='5250px' scrolling='no' frameborder='0'/>";       
                }else if(value=="10"){
                  var resURL = domain+"/upm_iframes/fema.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='750px' scrolling='no' frameborder='0'/>";       
                }else if(value=="11"){
                  var resURL = domain+"/upm_iframes/fencing.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='2550px' scrolling='no' frameborder='0'/>";       
                }else if(value=="12"){
                  var resURL = domain+"/upm_iframes/flooring.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='1350px' scrolling='no' frameborder='0'/>";       
                }else if(value=="13"){
                  var resURL = domain+"/upm_iframes/garage-door.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='750px' scrolling='no' frameborder='0'/>";       
                }else if(value=="14"){
                  var resURL = domain+"/upm_iframes/green-contracting.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='1050px' scrolling='no' frameborder='0'/>";       
                }else if(value=="15"){
                  var resURL = domain+"/upm_iframes/gutters.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='2050px' scrolling='no' frameborder='0'/>";       
                }else if(value=="16"){
                  var resURL = domain+"/upm_iframes/homeowner.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='750px' scrolling='no' frameborder='0'/>";       
                }else if(value=="17"){
                  var resURL = domain+"/upm_iframes/insurance.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='1850px' scrolling='no' frameborder='0'/>";       
                }else if(value=="18"){
                  var resURL = domain+"/upm_iframes/interior-exterior-design.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='1250px' scrolling='no' frameborder='0'/>";       
                }else if(value=="19"){
                  var resURL = domain+"/upm_iframes/landscaping-sprinklers.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='1550px' scrolling='no' frameborder='0'/>";       
                }else if(value=="20"){
                  var resURL = domain+"/upm_iframes/law-enforcement.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='3550px' scrolling='no' frameborder='0'/>";       
                }else if(value=="21"){
                  var resURL = domain+"/upm_iframes/oceanographers.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='1850px' scrolling='no' frameborder='0'/>";       
                }else if(value=="22"){
                  var resURL = domain+"/upm_iframes/painting-exterior-interiors.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='1650px' scrolling='no' frameborder='0'/>";       
                }else if(value=="23"){
                  var resURL = domain+"/upm_iframes/plumbing.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='950px' scrolling='no' frameborder='0'/>";       
                }else if(value=="24"){
                  var resURL = domain+"/upm_iframes/real-estate.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='950px' scrolling='no' frameborder='0'/>";       
                }else if(value=="25"){
                  var resURL = domain+"/upm_iframes/signage.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='2050px' scrolling='no' frameborder='0'/>";       
                }else if(value=="26"){
                  var resURL = domain+"/upm_iframes/signage-label-decals.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='2050px' scrolling='no' frameborder='0'/>";       
                }else if(value=="27"){
                  var resURL = domain+"/upm_iframes/solar-installs.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='750px' scrolling='no' frameborder='0'/>";       
                }else if(value=="28"){
                  var resURL = domain+"/upm_iframes/swimming-pool-spa.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='1850px' scrolling='no' frameborder='0'/>";       
                }else if(value=="29"){
                  var resURL = domain+"/upm_iframes/unique.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='1750px' scrolling='no' frameborder='0'/>";       
                }else if(value=="30"){
                  var resURL = domain+"/upm_iframes/utility-poles.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='1850px' scrolling='no' frameborder='0'/>";       
                }else if(value=="31"){
                  var resURL = domain+"/upm_iframes/vehicle-labeling-decals.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='1750px' scrolling='no' frameborder='0'/>";       
                }else if(value=="32"){
                  var resURL = domain+"/upm_iframes/window-door.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='474px' height='2050px' scrolling='no' frameborder='0'/>";       
                }else if(value=="33"){
                  var resURL = domain+"/upm_iframes/reference.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='476px' height='750px' scrolling='no' frameborder='0'/>";       
                }else if(value=="34"){
                  var resURL = domain+"/upm_iframes/aboutus.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='476px' height='750px' scrolling='no' frameborder='0'/>";       
                }else if(value=="35"){
                  var resURL = domain+"/upm_iframes/contactus.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='476px' height='750px' scrolling='no' frameborder='0'/>";       
                }else if(value=="36"){
                  var resURL = domain+"/upm_iframes/faq.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='476px' height='2550px' scrolling='no' frameborder='0'/>";       
                }else if(value=="37"){
                  var resURL = domain+"/upm_iframes/privacy-rights.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='476px' height='4550px' scrolling='no' frameborder='0'/>";       
                }else if(value=="38"){
                  var resURL = domain+"/upm_iframes/software-license-agreement.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='476px' height='4750px' scrolling='no' frameborder='0'/>";       
                }else if(value=="39"){
                  var resURL = domain+"/upm_iframes/green-contracting.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='476px' height='1000px' scrolling='no' frameborder='0'/>";       
                }else if(value=="40"){
                  var resURL = domain+"/upm_iframes/aboutus.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='476px' height='4750px' scrolling='no' frameborder='0'/>";       
                }else if(value=="41"){
                  var resURL = domain+"/upm_iframes/contactus.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='476px' height='4750px' scrolling='no' frameborder='0'/>";       
                }else if(value=="42"){
                  var resURL = domain+"/upm_iframes/faq.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='476px' height='4750px' scrolling='no' frameborder='0'/>";       
                }else if(value=="43"){
                  var resURL = domain+"/upm_iframes/demo.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='476px' height='4750px' scrolling='no' frameborder='0'/>";       
                }else if(value=="44"){
                  var resURL = domain+"/upm_iframes/craftsman-book-company.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='476px' height='4750px' scrolling='no' frameborder='0'/>";       
                }else if(value=="45"){
                  var resURL = domain+"/upm_iframes/national-major-retail-chains.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='476px' height='4750px' scrolling='no' frameborder='0'/>";       
                }else if(value=="46"){
                  var resURL = domain+"/upm_iframes/affiliate-program.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='476px' height='4750px' scrolling='no' frameborder='0'/>";       
                }else if(value=="47"){
                  var resURL = domain+"/upm_iframes/home-remodeling-industry.html";   
                  obj.innerHTML = "<iframe src='"+resURL+"' width='476px' height='4750px' scrolling='no' frameborder='0'/>";       
                }
        }
}
function callIframe(value){


}
function Set_Username(username){

setCookie("USERNAME",username,0);
}
function SESSION_DETAILS(){
    var USERTYPE=getCookie("USERTYPE");
    var SESSION_ID=getCookie("SESSION_ID");
    var USER_NAME=getCookie("USERNAME");
    var USER_ID=getCookie("USER_ID");
    return USERTYPE+","+SESSION_ID+","+USER_NAME+","+USER_ID;
}

function SetUserDetails(firstname, lastname, email, id){
    setCookie("FIRST_NAME",firstname,0);
    setCookie("LAST_NAME",lastname,0);
    setCookie("EMAIL",email,0);
    setCookie("USER_ID",id,0);
}




function USER_DETAILS(){
    var FIRST_NAME=getCookie("FIRST_NAME");
    var LAST_NAME=getCookie("LAST_NAME");
    var EMAIL=getCookie("EMAIL");
    var SESSION_ID=getCookie("SESSION_ID");
    var USER_ID=getCookie("USER_ID");
    var USER_NAME=getCookie("USERNAME");
    return FIRST_NAME+","+LAST_NAME+","+EMAIL+","+SESSION_ID+","+USER_ID+","+USER_NAME;
}
function gotousesdemo(){
        var URLString = location.href;
        var domain = URLString.substring(0,URLString.lastIndexOf("/"));
        if(domain!="-1"){
            var resURL = domain+"/VideoUsesDemo.html";
        var win = window.open(resURL,'addwindow','height=760,width=940,left=50');
        }
        
}
function gotopressdemo(){
        var URLString = location.href;
        var domain = URLString.substring(0,URLString.lastIndexOf("/"));
        if(domain!="-1"){
        var resURL = domain+"/PressVideo.html";
        var win = window.open(resURL,'addwindow','height=760,width=940,left=50');
        }
}
function gotoproductdemo(){
      
   var URLString = location.href;
   var domain = URLString.substring(0,URLString.lastIndexOf("/"));
        if(domain!="-1"){
        var resURL = domain+"/Video_Demonstrations.html";
        var win = window.open(resURL,'addwindow','height=760,width=940,left=50');  
        }
}
function HideSingIn(){
    document.getElementById("signinid").style.display = "none";
    document.getElementById("signout").style.display = "";
    document.getElementById("myaccountidproduct").style.display = "";
}

function SET_MODULE_NAME(modulename, reload){
    setCookie("MODULENAME",modulename,0);
    if (reload == "TRUE"){
        window.location.reload();
    }
}

function GET_MODULE_NAME(){
    var MODULENAME=getCookie("MODULENAME");
    return MODULENAME;
}

function OPENNEWTOOL(TOOLURL){
    var toolURL = TOOLURL;
    window.open(toolURL ,'UPHOTO','width=1250,height=700,left=10,top=20');
}

function OPENIMAGE(IMAGEURL){
    var URL = IMAGEURL;
    window.open(URL ,'UPHOTO');
}

function OPENEXPORTEDFILE(FILEURL){
    var URL = FILEURL;
    window.open(URL ,'UPHOTO');
}

function eraseCookie(name) {
    setCookie(name,"",1); 
}

function setCookie(name,value,days) {
    if (days) {
        var date = new Date();
        date.setTime(date.getTime()+(days*24*60*60*1000));
        var expires = "; expires="+date.toGMTString();
    }
    else var expires = "";
    document.cookie = name+"="+value+expires+"; path=/";
}

function getCookie(name) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for(var i=0;i < ca.length;i++) {
        var c = ca[i];
        while (c.charAt(0)==' ') c = c.substring(1,c.length);
        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
    }
    return null;
}
function productlist(){
var username=getCookie("USERNAME");        
         if(username == null || username =="null" || username == "Guest"){
            var URLString = location.href;
            var domain = URLString.substring(0,URLString.lastIndexOf("/"));
            if(domain!="-1"){
                var resURL = domain+"/Newsletter_Registration.html?h=UPM&t=UPM";
                var win = window.open(resURL,'_self');
            }
        }
 

}

function getstatus1(){
    var _control = getCookie('control');
    //Delete_Cookie("control");
    //alert("_control=============="+_control);
    return _control;
}
function resetdata1(){
    //Delete_Cookie("control");
    setCookie("control","false",0);    
    
}
